import java.awt.*;
import java.awt.event.InputEvent;

/**
 * @author LingLed
 * @version 1.0
 */
public class Main {
    static int distance = 1;
    private static Point location;


    static void move() {

    }

    public static void main(String[] args) {

    }

//    public static void main(String[] args) throws AWTException {
//        Robot robot = new Robot();
//        new Thread(){
//            @Override
//            public void run() {
//                while (true) {
//                    try {
//                        Thread.sleep(1);
//                    } catch (InterruptedException e) {
//                        throw new RuntimeException(e);
//                    }
//                    System.out.println(location.y--);
//                }
//            }
//        }.start();
//        while (true) {
//
//            try {
//                // 获取当前鼠标位置信息
//                // 获取鼠标的屏幕位置
//                //Point location = MouseInfo.getPointerInfo().getLocation();
//                // 打印鼠标位置
////            System.out.println("Mouse location: (" + location.x + ", " + location.y + ")");
//                // 创建一个新的Robot实例
//                /*菱形抖动
//                Robot robot = new Robot();
//                location = MouseInfo.getPointerInfo().getLocation();
//                robot.mouseMove(location.x + distance, location.y);
//                location = MouseInfo.getPointerInfo().getLocation();
//                robot.mouseMove(location.x, location.y + distance);
//                location = MouseInfo.getPointerInfo().getLocation();
//                robot.mouseMove(location.x - distance, location.y);
//                location = MouseInfo.getPointerInfo().getLocation();
//                robot.mouseMove(location.x, location.y - distance);
//*/
//                /*正方形抖动
//                Robot robot = new Robot();
//                location = MouseInfo.getPointerInfo().getLocation();
//                robot.mouseMove(location.x + distance, location.y + distance);
//                location = MouseInfo.getPointerInfo().getLocation();
//                robot.mouseMove(location.x + distance, location.y - distance);
//                location = MouseInfo.getPointerInfo().getLocation();
//                robot.mouseMove(location.x - distance, location.y - distance);
//                location = MouseInfo.getPointerInfo().getLocation();
//                robot.mouseMove(location.x - distance, location.y + distance);
//*/
//
//                //
//
//                location = MouseInfo.getPointerInfo().getLocation();
//                robot.mouseMove(location.x - distance, location.y + distance);
//                location = MouseInfo.getPointerInfo().getLocation();
//                robot.mouseMove(location.x + distance, location.y - distance);
//
//                // 如果你还想模拟鼠标点击
//                //robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
//                //robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
//            } catch (Exception e) {
//                e.printStackTrace();
//            }
//        }
//    }
}